import request from '@/utils/request'

// 查询脚本列表
export function listScripts(query) {
  return request({
    url: '/system/scripts/list',
    method: 'get',
    params: query
  })
}

// 查询脚本详细
export function getScripts(scriptId) {
  return request({
    url: '/system/scripts/' + scriptId,
    method: 'get'
  })
}

// 新增脚本
export function addScripts(data) {
  return request({
    url: '/system/scripts',
    method: 'post',
    data: data
  })
}

// 修改脚本
export function updateScripts(data) {
  return request({
    url: '/system/scripts',
    method: 'put',
    data: data
  })
}

// 删除脚本
export function delScripts(scriptId) {
  return request({
    url: '/system/scripts/' + scriptId,
    method: 'delete'
  })
}
